import Mock from 'mockjs'
import setupMock, {
    successResponseWrap,
    failResponseWrap,
} from '@/libs/setup-mock'

setupMock({
    mock: true,
    setup() {
        // 用户信息
        Mock.mock(new RegExp('api/app/getCurrentMember'), () => {
            return {
                "Code": 0,
                "Data": {
                    "Id": "binfbsc6no9k7p6m6ac0",
                    "CreatedAt": null,
                    "UpdatedAt": null,
                    "Version": "",
                    "Name": "W.QQ",
                    "Qq": "",
                    "Phone": "13637605812",
                    "Sex": 0,
                    "AvaterUrl": "http://thirdwx.qlogo.cn/mmopen/PjrNbRuOa98LVHyn7t2yTpxlxRGkiav1Y2f912icib7t6FmdBOFSrp1bTRBHDCkgpr2KcwZuwicbVpMrROj3FLnpcapLqEqdlght/132",
                    "WxOpenid": "",
                    "WxUnionid": "",
                    "Roles": "bkqjamfrlesbpmsiq3hg",
                    "Feature": "native_preview,native_publish,template_preview,template_publish,plugin_page,module_page,outerlink_page,ele_data,dev_data,extend_json",
                    "Status": 0,
                    "LastLoginTime": "",
                    "TCloudOpenid": "",
                    "TCloudUnionid": ""
                },
                "Message": "获取成功",
                "Status": 1
            }
        })

        // 登录
        Mock.mock(new RegExp('api/public/login'), () => {
            return {
                "Code": 0,
                "Data": {
                    "token": "de4a92ad8c0869bc6b2f3ab760e2826c"
                },
                "Message": "登录成功",
                "Status": 1
            }
        })
    }
})